package com.example.mapper;

import com.example.entity.Dingdanshenhe;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DingdanshenheMapper {

    void insert(Dingdanshenhe dingdanshenhe);

    void deleteById(Integer id);

    void updateById(Dingdanshenhe dingdanshenhe);

    List<Dingdanshenhe> selectAll(Dingdanshenhe dingdanshenhe);

    @Select("select * from dingdanshenhe where id = #{userId}")
    Dingdanshenhe selectById(Integer dingdanshenhe);
    @Select("select * from dingdanshenhe where user_id = #{userId} and shangpin_id = #{shangpinId}")
    Dingdanshenhe selectByUserId(Integer userId, Integer shangpinId);
}
